useFixture(default)

def test():
	from Modules import commonBits
	java_recorded_version = '1.6.0_22'

	if window('Protocol Buffer Editor'):
		select('File_Txt', commonBits.sampleDir() + 'DTAR020_tst1.bin')
		click('Edit1')
		select_menu('View>>Sorted Field Tree')
		select('fields_JTbl', 'Store_No', 'Field,0')
		select('fields_JTbl', 'Dept_No', 'Field,1')
		select('fields_JTbl', 'cell:Field,1(Dept_No)')
		select('fieldSummary_JTbl', 'cell:Function,4()')
		select('fields_JTbl', 'cell:Field,1(Dept_No)')
		select('fieldSummary_JTbl', 'Sum', 'Function,4')
		select('fieldSummary_JTbl', 'Sum', 'Function,5')
		select('fieldSummary_JTbl', 'Minimum', 'Function,1')
		select('fieldSummary_JTbl', 'Minimum', 'Function,3')
		select('fieldSummary_JTbl', 'cell:Function,3(Minimum)')
		assert_p('fieldSummary_JTbl', 'Content', '[[Keycode_no, ], [Store_No, Minimum], [DATE, ], [Dept_No, Minimum], [Qty_Sold, Sum], [Sale_Price, Sum]]')
		select('fieldSummary_JTbl', 'cell:Function,3(Minimum)')
		assert_p('fields_JTbl', 'Content', '[[Store_No, true], [Dept_No, true], [ , true], [ , true], [ , true]]')
		select('fieldSummary_JTbl', 'cell:Function,3(Minimum)')
		click('Build Tree')
		select('LineTree.FileDisplay_JTbl', 'cell:Store_No,8(20)')
		assert_p('LineTree.FileDisplay_JTbl', 'Content', '[[, , , 20, , 170, 2, 9880], [, , , 20, , 170, 1, 4870], [, , 63604808, 20, 40118, 170, 1, 4870], [, , , 20, , 280, 1, 5010], [, , 69684558, 20, 40118, 280, 1, 19000], [, , 69684558, 20, 40118, 280, -1, -19000], [, , 69694158, 20, 40118, 280, 1, 5010], [, , , 20, , 685, 0, 0], [, , 62684671, 20, 40118, 685, 1, 69990], [, , 62684671, 20, 40118, 685, -1, -69990], [, , , 59, , 335, 5, 35910], [, , , 59, , 335, 1, 12990], [, , 61664713, 59, 40118, 335, 1, 17990], [, , 61664713, 59, 40118, 335, -1, -17990], [, , 61684613, 59, 40118, 335, 1, 12990], [, , , 59, , 410, 1, 8990], [, , 68634752, 59, 40118, 410, 1, 8990], [, , , 59, , 620, 2, 7980], [, , 60694698, 59, 40118, 620, 1, 3990], [, , 60664659, 59, 40118, 620, 1, 3990], [, , , 59, , 878, 1, 5950], [, , 60614487, 59, 40118, 878, 1, 5950], [, , , 166, , 170, 4, 42560], [, , , 166, , 60, 1, 5080], [, , 68654655, 166, 40118, 60, 1, 5080], [, , , 166, , 80, 2, 31490], [, , 69624033, 166, 40118, 80, 1, 18190], [, , 60604100, 166, 40118, 80, 1, 13300], [, , , 166, , 170, 1, 5990], [, , 68674560, 166, 40118, 170, 1, 5990]]')
		select_menu('File>>Export as CSV file')
		select('Csv.Delimiter_Txt', ';')
		select('Csv.names on first line_Chk', 'true')
		select('Edit Output File_Chk', 'true')
		select('Keep screen open_Chk', 'true')
		click('Save File')
		assert_p('LineList.FileDisplay_JTbl', 'Content', '[[File, , , , , 166, , 170, 11, 88350], [File, 20, , , , 20, , 170, 2, 9880], [File, 20, 170, , , 20, , 170, 1, 4870], [File, 20, 170, , 63604808, 20, 40118, 170, 1, 4870], [File, 20, 280, , , 20, , 280, 1, 5010], [File, 20, 280, , 69684558, 20, 40118, 280, 1, 19000], [File, 20, 280, , 69684558, 20, 40118, 280, -1, -19000], [File, 20, 280, , 69694158, 20, 40118, 280, 1, 5010], [File, 20, 685, , , 20, , 685, 0, 0], [File, 20, 685, , 62684671, 20, 40118, 685, 1, 69990], [File, 20, 685, , 62684671, 20, 40118, 685, -1, -69990], [File, 59, , , , 59, , 335, 5, 35910], [File, 59, 335, , , 59, , 335, 1, 12990], [File, 59, 335, , 61664713, 59, 40118, 335, 1, 17990], [File, 59, 335, , 61664713, 59, 40118, 335, -1, -17990], [File, 59, 335, , 61684613, 59, 40118, 335, 1, 12990], [File, 59, 410, , , 59, , 410, 1, 8990], [File, 59, 410, , 68634752, 59, 40118, 410, 1, 8990], [File, 59, 620, , , 59, , 620, 2, 7980], [File, 59, 620, , 60694698, 59, 40118, 620, 1, 3990], [File, 59, 620, , 60664659, 59, 40118, 620, 1, 3990], [File, 59, 878, , , 59, , 878, 1, 5950], [File, 59, 878, , 60614487, 59, 40118, 878, 1, 5950], [File, 166, , , , 166, , 170, 4, 42560], [File, 166, 60, , , 166, , 60, 1, 5080], [File, 166, 60, , 68654655, 166, 40118, 60, 1, 5080], [File, 166, 80, , , 166, , 80, 2, 31490], [File, 166, 80, , 69624033, 166, 40118, 80, 1, 18190], [File, 166, 80, , 60604100, 166, 40118, 80, 1, 13300], [File, 166, 170, , , 166, , 170, 1, 5990], [File, 166, 170, , 68674560, 166, 40118, 170, 1, 5990]]')
		select('LineList.Layouts_Txt', 'Full Line')
		assert_p('LineList.FileDisplay_JTbl', 'Content', '[[File;;;;;166;;170;11;88350], [File;20;;;;20;;170;2;9880], [File;20;170;;;20;;170;1;4870], [File;20;170;;63604808;20;40118;170;1;4870], [File;20;280;;;20;;280;1;5010], [File;20;280;;69684558;20;40118;280;1;19000], [File;20;280;;69684558;20;40118;280;-1;-19000], [File;20;280;;69694158;20;40118;280;1;5010], [File;20;685;;;20;;685;0;0], [File;20;685;;62684671;20;40118;685;1;69990], [File;20;685;;62684671;20;40118;685;-1;-69990], [File;59;;;;59;;335;5;35910], [File;59;335;;;59;;335;1;12990], [File;59;335;;61664713;59;40118;335;1;17990], [File;59;335;;61664713;59;40118;335;-1;-17990], [File;59;335;;61684613;59;40118;335;1;12990], [File;59;410;;;59;;410;1;8990], [File;59;410;;68634752;59;40118;410;1;8990], [File;59;620;;;59;;620;2;7980], [File;59;620;;60694698;59;40118;620;1;3990], [File;59;620;;60664659;59;40118;620;1;3990], [File;59;878;;;59;;878;1;5950], [File;59;878;;60614487;59;40118;878;1;5950], [File;166;;;;166;;170;4;42560], [File;166;60;;;166;;60;1;5080], [File;166;60;;68654655;166;40118;60;1;5080], [File;166;80;;;166;;80;2;31490], [File;166;80;;69624033;166;40118;80;1;18190], [File;166;80;;60604100;166;40118;80;1;13300], [File;166;170;;;166;;170;1;5990], [File;166;170;;68674560;166;40118;170;1;5990]]')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		select('Csv.names on first line_Chk', 'false')
		click('Save File')
		assert_p('LineList.FileDisplay_JTbl', 'Content', '[[File, , , , , 166, , 170, 11, 88350], [File, 20, , , , 20, , 170, 2, 9880], [File, 20, 170, , , 20, , 170, 1, 4870], [File, 20, 170, , 63604808, 20, 40118, 170, 1, 4870], [File, 20, 280, , , 20, , 280, 1, 5010], [File, 20, 280, , 69684558, 20, 40118, 280, 1, 19000], [File, 20, 280, , 69684558, 20, 40118, 280, -1, -19000], [File, 20, 280, , 69694158, 20, 40118, 280, 1, 5010], [File, 20, 685, , , 20, , 685, 0, 0], [File, 20, 685, , 62684671, 20, 40118, 685, 1, 69990], [File, 20, 685, , 62684671, 20, 40118, 685, -1, -69990], [File, 59, , , , 59, , 335, 5, 35910], [File, 59, 335, , , 59, , 335, 1, 12990], [File, 59, 335, , 61664713, 59, 40118, 335, 1, 17990], [File, 59, 335, , 61664713, 59, 40118, 335, -1, -17990], [File, 59, 335, , 61684613, 59, 40118, 335, 1, 12990], [File, 59, 410, , , 59, , 410, 1, 8990], [File, 59, 410, , 68634752, 59, 40118, 410, 1, 8990], [File, 59, 620, , , 59, , 620, 2, 7980], [File, 59, 620, , 60694698, 59, 40118, 620, 1, 3990], [File, 59, 620, , 60664659, 59, 40118, 620, 1, 3990], [File, 59, 878, , , 59, , 878, 1, 5950], [File, 59, 878, , 60614487, 59, 40118, 878, 1, 5950], [File, 166, , , , 166, , 170, 4, 42560], [File, 166, 60, , , 166, , 60, 1, 5080], [File, 166, 60, , 68654655, 166, 40118, 60, 1, 5080], [File, 166, 80, , , 166, , 80, 2, 31490], [File, 166, 80, , 69624033, 166, 40118, 80, 1, 18190], [File, 166, 80, , 60604100, 166, 40118, 80, 1, 13300], [File, 166, 170, , , 166, , 170, 1, 5990], [File, 166, 170, , 68674560, 166, 40118, 170, 1, 5990]]')
		select('LineList.Layouts_Txt', 'Full Line')
		assert_p('LineList.FileDisplay_JTbl', 'Content', '[[File;;;;;166;;170;11;88350], [File;20;;;;20;;170;2;9880], [File;20;170;;;20;;170;1;4870], [File;20;170;;63604808;20;40118;170;1;4870], [File;20;280;;;20;;280;1;5010], [File;20;280;;69684558;20;40118;280;1;19000], [File;20;280;;69684558;20;40118;280;-1;-19000], [File;20;280;;69694158;20;40118;280;1;5010], [File;20;685;;;20;;685;0;0], [File;20;685;;62684671;20;40118;685;1;69990], [File;20;685;;62684671;20;40118;685;-1;-69990], [File;59;;;;59;;335;5;35910], [File;59;335;;;59;;335;1;12990], [File;59;335;;61664713;59;40118;335;1;17990], [File;59;335;;61664713;59;40118;335;-1;-17990], [File;59;335;;61684613;59;40118;335;1;12990], [File;59;410;;;59;;410;1;8990], [File;59;410;;68634752;59;40118;410;1;8990], [File;59;620;;;59;;620;2;7980], [File;59;620;;60694698;59;40118;620;1;3990], [File;59;620;;60664659;59;40118;620;1;3990], [File;59;878;;;59;;878;1;5950], [File;59;878;;60614487;59;40118;878;1;5950], [File;166;;;;166;;170;4;42560], [File;166;60;;;166;;60;1;5080], [File;166;60;;68654655;166;40118;60;1;5080], [File;166;80;;;166;;80;2;31490], [File;166;80;;69624033;166;40118;80;1;18190], [File;166;80;;60604100;166;40118;80;1;13300], [File;166;170;;;166;;170;1;5990], [File;166;170;;68674560;166;40118;170;1;5990]]')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		select('CsvColNames_JTbl', 'cell:Include,3(true)')
		select('CsvColNames_JTbl', 'cell:Include,4(true)')
		select('CsvColNames_JTbl', 'cell:Include,3(false)')
		select('CsvColNames_JTbl', 'cell:Include,2(true)')
		click('Save File')
		assert_p('LineList.FileDisplay_JTbl', 'Content', '[[File, , , , , 166, 170, 88350], [File, 20, , , , 20, 170, 9880], [File, 20, 170, , , 20, 170, 4870], [File, 20, 170, , 63604808, 20, 170, 4870], [File, 20, 280, , , 20, 280, 5010], [File, 20, 280, , 69684558, 20, 280, 19000], [File, 20, 280, , 69684558, 20, 280, -19000], [File, 20, 280, , 69694158, 20, 280, 5010], [File, 20, 685, , , 20, 685, 0], [File, 20, 685, , 62684671, 20, 685, 69990], [File, 20, 685, , 62684671, 20, 685, -69990], [File, 59, , , , 59, 335, 35910], [File, 59, 335, , , 59, 335, 12990], [File, 59, 335, , 61664713, 59, 335, 17990], [File, 59, 335, , 61664713, 59, 335, -17990], [File, 59, 335, , 61684613, 59, 335, 12990], [File, 59, 410, , , 59, 410, 8990], [File, 59, 410, , 68634752, 59, 410, 8990], [File, 59, 620, , , 59, 620, 7980], [File, 59, 620, , 60694698, 59, 620, 3990], [File, 59, 620, , 60664659, 59, 620, 3990], [File, 59, 878, , , 59, 878, 5950], [File, 59, 878, , 60614487, 59, 878, 5950], [File, 166, , , , 166, 170, 42560], [File, 166, 60, , , 166, 60, 5080], [File, 166, 60, , 68654655, 166, 60, 5080], [File, 166, 80, , , 166, 80, 31490], [File, 166, 80, , 69624033, 166, 80, 18190], [File, 166, 80, , 60604100, 166, 80, 13300], [File, 166, 170, , , 166, 170, 5990], [File, 166, 170, , 68674560, 166, 170, 5990]]')
		select('LineList.Layouts_Txt', 'Full Line')
		assert_p('LineList.FileDisplay_JTbl', 'Content', '[[File;;;;;166;170;88350], [File;20;;;;20;170;9880], [File;20;170;;;20;170;4870], [File;20;170;;63604808;20;170;4870], [File;20;280;;;20;280;5010], [File;20;280;;69684558;20;280;19000], [File;20;280;;69684558;20;280;-19000], [File;20;280;;69694158;20;280;5010], [File;20;685;;;20;685;0], [File;20;685;;62684671;20;685;69990], [File;20;685;;62684671;20;685;-69990], [File;59;;;;59;335;35910], [File;59;335;;;59;335;12990], [File;59;335;;61664713;59;335;17990], [File;59;335;;61664713;59;335;-17990], [File;59;335;;61684613;59;335;12990], [File;59;410;;;59;410;8990], [File;59;410;;68634752;59;410;8990], [File;59;620;;;59;620;7980], [File;59;620;;60694698;59;620;3990], [File;59;620;;60664659;59;620;3990], [File;59;878;;;59;878;5950], [File;59;878;;60614487;59;878;5950], [File;166;;;;166;170;42560], [File;166;60;;;166;60;5080], [File;166;60;;68654655;166;60;5080], [File;166;80;;;166;80;31490], [File;166;80;;69624033;166;80;18190], [File;166;80;;60604100;166;80;13300], [File;166;170;;;166;170;5990], [File;166;170;;68674560;166;170;5990]]')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		select('Csv.Delimiter_Txt', '|')
		click('Save File')
		assert_p('LineList.FileDisplay_JTbl', 'Content', '[[File, , , , , 166, 170, 88350], [File, 20, , , , 20, 170, 9880], [File, 20, 170, , , 20, 170, 4870], [File, 20, 170, , 63604808, 20, 170, 4870], [File, 20, 280, , , 20, 280, 5010], [File, 20, 280, , 69684558, 20, 280, 19000], [File, 20, 280, , 69684558, 20, 280, -19000], [File, 20, 280, , 69694158, 20, 280, 5010], [File, 20, 685, , , 20, 685, 0], [File, 20, 685, , 62684671, 20, 685, 69990], [File, 20, 685, , 62684671, 20, 685, -69990], [File, 59, , , , 59, 335, 35910], [File, 59, 335, , , 59, 335, 12990], [File, 59, 335, , 61664713, 59, 335, 17990], [File, 59, 335, , 61664713, 59, 335, -17990], [File, 59, 335, , 61684613, 59, 335, 12990], [File, 59, 410, , , 59, 410, 8990], [File, 59, 410, , 68634752, 59, 410, 8990], [File, 59, 620, , , 59, 620, 7980], [File, 59, 620, , 60694698, 59, 620, 3990], [File, 59, 620, , 60664659, 59, 620, 3990], [File, 59, 878, , , 59, 878, 5950], [File, 59, 878, , 60614487, 59, 878, 5950], [File, 166, , , , 166, 170, 42560], [File, 166, 60, , , 166, 60, 5080], [File, 166, 60, , 68654655, 166, 60, 5080], [File, 166, 80, , , 166, 80, 31490], [File, 166, 80, , 69624033, 166, 80, 18190], [File, 166, 80, , 60604100, 166, 80, 13300], [File, 166, 170, , , 166, 170, 5990], [File, 166, 170, , 68674560, 166, 170, 5990]]')
		select('LineList.Layouts_Txt', 'Full Line')
		assert_p('LineList.FileDisplay_JTbl', 'Content', '[[File|||||166|170|88350], [File|20||||20|170|9880], [File|20|170|||20|170|4870], [File|20|170||63604808|20|170|4870], [File|20|280|||20|280|5010], [File|20|280||69684558|20|280|19000], [File|20|280||69684558|20|280|-19000], [File|20|280||69694158|20|280|5010], [File|20|685|||20|685|0], [File|20|685||62684671|20|685|69990], [File|20|685||62684671|20|685|-69990], [File|59||||59|335|35910], [File|59|335|||59|335|12990], [File|59|335||61664713|59|335|17990], [File|59|335||61664713|59|335|-17990], [File|59|335||61684613|59|335|12990], [File|59|410|||59|410|8990], [File|59|410||68634752|59|410|8990], [File|59|620|||59|620|7980], [File|59|620||60694698|59|620|3990], [File|59|620||60664659|59|620|3990], [File|59|878|||59|878|5950], [File|59|878||60614487|59|878|5950], [File|166||||166|170|42560], [File|166|60|||166|60|5080], [File|166|60||68654655|166|60|5080], [File|166|80|||166|80|31490], [File|166|80||69624033|166|80|18190], [File|166|80||60604100|166|80|13300], [File|166|170|||166|170|5990], [File|166|170||68674560|166|170|5990]]')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
	close()
